import { defHttp } from '/@/utils/http/axios';
import { IPostPostUpdateRequest } from '/@/types/system/senior/post/update';
import { IPostPostAddRequest } from '/@/types/system/senior/post/add';
import { IGetPostListQuery, IGetPostListResponse } from '/@/types/system/senior/post/list';
import { IPostPostExportQuery } from '/@/types/system/senior/post/export';
import { IGetRawPostDetailsResponse } from '/@/types/system/senior/post/details';

/**
 * 修改职位
 */
export const apiPostUpdate = (params: IPostPostUpdateRequest) =>
  defHttp.post({ url: `/system/senior/post/update`, params });
/**
 * 删除职位
 */
export const apiPostDeletePostIdsPath = (postIds: string | number) =>
  defHttp.delete({ url: `/system/senior/post/delete${postIds}` });
/**
 * 添加职位
 */
export const apiPostAdd = (params: IPostPostAddRequest) =>
  defHttp.post({ url: `/system/senior/post/add`, params });
/**
 * 职位列表
 */
export const apiPostListQuery = (params: IGetPostListQuery) =>
  defHttp.get<IGetPostListResponse>({ url: `/system/senior/post/list`, params });
/**
 * 职位列表导出
 */
export const apiPostExportQuery = (params: IPostPostExportQuery) =>
  defHttp.post({ url: `/system/senior/post/export`, params });
/**
 * 职位详情
 */
export const apiPostDetailsPath = (postId: string | number) =>
  defHttp.get<IGetRawPostDetailsResponse>({ url: `/system/senior/post/details/${postId}` });
